package com.javalaoniu.tool.excel;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Student {
    @ExcelProperty(value = "姓名", index = 0)
    private String name;

    @ExcelProperty(value = "年龄", index = 1)
    private int age;

    @ExcelProperty(value = "地址", index = 2)
    private String address;

    // easyexcel日期类型不支持LocalDate，只能是Date
    @ExcelProperty(value = "生日", index = 3)
    @DateTimeFormat("yyyy-MM-dd")
    private Date birthday;
}
